
public class Client {
	public static void main(String args[])
	{
		//exemple cu vector
		
		Vector v = new Vector(10);
	  	v.afiseaza();	  
	  	v.adauga(1);
	  	v.adauga(2);
	  	v.adauga(3);
	  	v.adauga(2);
	  	
	  	System.out.println("Afiseaza vector:");
	  	v.afiseaza();
	  	v.sterge2(2);
	  	
	  	System.out.println("Afiseaza vector dupa suprimare:");
	  	v.afiseaza();
	  	
	  	//exemple cu lista
	  	Lista l = new Lista(10);
	  	l.adauga(0);
	  	l.adauga(1);
	  	l.adauga(2);
	  	l.adauga(3);
	  	
	  	System.out.println("Afisare lista:");
	  	l.afiseaza();
	  	l.inserareLaIndice(7,12);	//numerotarea pozitiilor incepe de la 0
	  	
	  	System.out.println("Afisare lista dupa inserare la indice:");
	  	l.afiseaza();
	  	l.sterge(0);
	  	
	  	System.out.println("Afisare lista dupa suprimare:");
	  	l.afiseaza();
	  	
	  	//exemplu de multime
	  	Multime m = new Multime(10);
	  	m.adauga(0);
	  	m.adauga(1);
	  	m.adauga(2);
	  	m.adauga(3);
	  	
		Multime m2 = new Multime(10);
		m2.adauga(1);
	  	m2.adauga(3);
	  	m2.adauga(7);
	  	m2.adauga(12);
	  	
	  	System.out.println("\nAfisarea multimii:");
	  	m.afiseaza();
	  	
	  	int element = 2;
	  	int element2 = 12;
	  	
	  	System.out.println("elementul "+element+" apartine?: "+m.apartine(element));
	  	System.out.println("elementul "+element2+" apartine?: "+m.apartine(element2));
	  	
	  	m.sterge(2);
	  	System.out.println("Dupa suprimare:");
	  	m.afiseaza();
	  	
	  	System.out.println("\nPrima multime:");
	  	m.afiseaza();
	  	System.out.println("A 2-a multime:");
	  	m2.afiseaza();
	  	
	  	
	  	m.reuniune(m2);
	  	System.out.println("Noua multime formata din reuniunea multimii 1 cu 2:");
	  	m.afiseaza();
	}

}

